{extends file="../acp.html"}

{block name="title"}{$head_title}{/block}
{block name="css"}

{/block}
{block name="content"}
<form id='base_config' action='' method='POST'>

    <div id="add_hot" class="formactions mgl180">
        <a href="javascript:;" onclick="add_hot_name()" ; class="btn btn-blue"><i class="gicon-plus white"></i>添加孵化器热搜词</a>
    </div>

    {foreach from = $hot_name_arr item = hot}
    <div class="formitems inline">
        <label class="fi-name"><span class="colorRed">*</span> 孵化器热搜：</label>
        <div class="form-controls">
            <input type="text" name="hot_name[]" value="{$hot}" placeholder="输入孵化器关键词">
            <a href="javascript:;" onclick="del_qj($(this))" class="btn" title="删除"><i class="gicon-trash black"></i>删除</a>
            <span class="fi-help-text"></span>
        </div>
    </div>
    {/foreach}


    <div id="add_service_hot" class="formactions mgl180">
        <a href="javascript:;" onclick="add_service_hot()" ; class="btn btn-blue"><i class="gicon-plus white"></i>添加服务商热搜词</a>
    </div>
    {foreach from = $hot_service_name_arr item = hot_service}
    <div class="formitems inline">
        <label class="fi-name"><span class="colorRed">*</span> 服务商热搜：</label>
        <div class="form-controls">
            <input type="text" name="hot_service_name[]" value="{$hot_service}" placeholder="输入服务商关键词">
            <a href="javascript:;" onclick="del_qj($(this))" class="btn" title="删除"><i class="gicon-trash black"></i>删除</a>
            <span class="fi-help-text"></span>
        </div>
    </div>
    {/foreach}

    <div class="formitems inline">
        <label class="fi-name"></label>
        <div class="form-controls">
            <input type='hidden' name='act' value='save'/>
            <button type="submit" class="btn btn-blue"><i class="gicon-check white"></i>确定</button>
            <button type="reset" class="btn"><i class="gicon-repeat"></i>重置</button>
        </div>
    </div>
</form>
{/block}

{block name="js"}
<script>
    function add_hot_name() {

        var html = '<div class="formitems inline">' +
                '<label class="fi-name"><span class="colorRed">*</span> 孵化器热搜：</label>' +
                '<div class="form-controls">' +
                '<input type="text" name="hot_name[]" value="" placeholder="输入热搜关键词">' +
                '<a href="javascript:;" onclick="del_qj($(this))" class="btn" title="删除"><i class="gicon-trash black"></i>删除</a>' +
                '<span class="fi-help-text"></span>' +
                '</div>' +
                '</div>';

        $('#add_hot').after(html);
    }

    function add_service_hot() {

        var html = '<div class="formitems inline">' +
                '<label class="fi-name"><span class="colorRed">*</span> 服务商热搜：</label>' +
                '<div class="form-controls">' +
                '<input type="text" name="hot_service_name[]" value="" placeholder="输入热搜关键词">' +
                '<a href="javascript:;" onclick="del_qj($(this))" class="btn" title="删除"><i class="gicon-trash black"></i>删除</a>' +
                '<span class="fi-help-text"></span>' +
                '</div>' +
                '</div>';

        $('#add_service_hot').after(html);
    }


    //删除热卖参数
    function del_qj(obj) {
        obj.parent().parent().remove();
    }

</script>
{/block}

{block name="css"}
{/block}
